<?php
/**
 * Medical Study - Header Block
 *
 */

use Fox\Dao\SqlFragment;
use Nawa\MedicalStudy;
use Nawa\MedicalStudy\Status;
use Fox\Html\DropList;
use Nawa\Customer;
use Fox\Html\Input;
$block = new Fox\Html\Block("bHeader",Msg(Fox\Msg::BUNDLE,Fox\Msg::MSG_HEADER_DATA));
// Customer
$block->add(new DropList(array("ms_customer","customerid"),true,false,true))
->options(Customer::customers(),"customerid","name1");
// Status
$finder = new Status();
$status = $finder->find();//@TODO filter by authorization
$block->add(new DropList("status",true,false,true,MedicalStudy::STATUS_NEW),2,'customerid')
->options($status,"status","label");
// MS Reference (Code)
$block->add(new Input(array("ms_reference","reference"),true));
// Short Description
$block->add(new Input(array("ms_label","label")))->size(Input::SIZE_XLARGE);
// Start Date
$block->add(new Input("start_date",true));
// End Date
$block->add(new Input("end_date"),2,'start_date');
return $block;